<template>
  <nm-form-dialog ref="form" v-bind="form" v-on="on" :visible.sync="visible_">
    <el-row>
      <el-col :span="20" :offset="1">
        <el-form-item label="积分数：" prop="score">
          <el-input v-model="form.model.score" clearable />
        </el-form-item>
        <el-form-item label="来源：" prop="dataSource">
          <el-input v-model="form.model.dataSource" clearable />
        </el-form-item>
        <el-form-item label="来源ID：" prop="dataSourceId">
          <el-input v-model="form.model.dataSourceId" clearable />
        </el-form-item>
        <el-form-item label="描述：" prop="dataRemarks">
          <el-input v-model="form.model.dataRemarks" clearable />
        </el-form-item>
        <el-form-item label="积分类型：" prop="scoreType">
          <el-input v-model="form.model.scoreType" clearable />
        </el-form-item>
      </el-col>
    </el-row>
  </nm-form-dialog>
</template>
<script>
import { mixins } from 'nbmodular-ui'

const { add, edit, update } = $api.member.userScores

export default {
  mixins: [mixins.formSave],
  data() {
    return {
      title: '用户积分表',
      actions: { add, edit, update },
      form: {
        model: {
          /** 积分数 */
          score: '',
          /** 来源 */
          dataSource: '',
          /** 来源ID */
          dataSourceId: '',
          /** 描述 */
          dataRemarks: '',
          /** 积分类型 */
          scoreType: ''
        },
        rules: {}
      }
    }
  }
}
</script>
